package com.xiaozhengkeji.springcloud.ezcloud.common.core.feign;

import com.xiaozhengkeji.springcloud.ezcloud.common.core.base.entitys.user.SystemUserEntity;
import com.xiaozhengkeji.springcloud.ezcloud.common.core.bean.RetResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("ezcloud-service-user")
public interface UserServiceFeign {
    @GetMapping("/system_user/infoByUid")
    SystemUserEntity infoByUid(@RequestParam("uid") Integer uid);

    @GetMapping("/system_user/infoByUsername")
    List<SystemUserEntity> infoByUid(@RequestParam("infoByUsername") String infoByUsername,
                                     @RequestParam("isLike") Boolean isLike);

    @GetMapping("/system_user/infoByMailbox")
    List<SystemUserEntity> infoByMailbox(@RequestParam("infoByMailbox") String infoByMailbox,
                            @RequestParam("isLike") Boolean isLike);

    @PostMapping("/system_user/register")
    Integer register(@RequestParam("username") String username,
                       @RequestParam("password") String password);

}
